package com.shopreg.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Table(name="SHOP_DETAILS")
public class ShopDetails {

	private int shopId;
	private String shopName;
	private String shopType;
	private String country;
	private String state;
	private String district;
	private String pinCode;
	private String shopLocation;
	private Address shopAddress;
	private String shopLandMark;
	private PhoneNumbers phoneNumbers;
	private Date entryDate;
	private Set<ShopMenuCategory> menuCatlog = new HashSet<ShopMenuCategory>();
	
	@Id
	@GeneratedValue
	@Column(name = "SHOP_ID")
	public int getShopId() {
		return shopId;
	}
	public void setShopId(int shopId) {
		this.shopId = shopId;
	}
	@Column(name = "SHOP_NAME")
	public String getShopName() {
		return shopName;
	}
	public void setShopName(String shopName) {
		this.shopName = shopName;
	}
	@Column(name = "SHOP_TYPE")
	public String getShopType() {
		return shopType;
	}
	public void setShopType(String shopType) {
		this.shopType = shopType;
	}
	@Column(name = "COUNTRY")
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	@Column(name = "STATE")
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	@Column(name = "DISTRICT")
	public String getDistrict() {
		return district;
	}
	public void setDistrict(String district) {
		this.district = district;
	}
	@Column(name = "PINCODE")
	public String getPinCode() {
		return pinCode;
	}
	public void setPinCode(String pinCode) {
		this.pinCode = pinCode;
	}
	@Column(name = "SHOP_LOCATION")
	public String getShopLocation() {
		return shopLocation;
	}
	public void setShopLocation(String shopLocation) {
		this.shopLocation = shopLocation;
	}
	@OneToOne(fetch=FetchType.EAGER,cascade=CascadeType.ALL,mappedBy="shopDetails")
	public Address getShopAddress() {
		return shopAddress;
	}
	public void setShopAddress(Address shopAddress) {
		this.shopAddress = shopAddress;
	}
	@Column(name = "SHOP_LANDMARK")
	public String getShopLandMark() {
		return shopLandMark;
	}
	public void setShopLandMark(String shopLandMark) {
		this.shopLandMark = shopLandMark;
	}
	@OneToOne(fetch=FetchType.EAGER,cascade=CascadeType.ALL,mappedBy="shopDetails")
	public PhoneNumbers getPhoneNumbers() {
		return phoneNumbers;
	}
	public void setPhoneNumbers(PhoneNumbers phoneNumbers) {
		this.phoneNumbers = phoneNumbers;
	}
	@Column(name = "ENTRY_DATE")
	public Date getEntryDate() {
		return entryDate;
	}
	public void setEntryDate(Date entryDate) {
		this.entryDate = entryDate;
	}
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "shopDetails")
	public Set<ShopMenuCategory> getMenuCatlog() {
		return menuCatlog;
	}
	public void setMenuCatlog(Set<ShopMenuCategory> menuCatlog) {
		this.menuCatlog = menuCatlog;
	}
	
	
	
}
